package com.yeming.flink.mudlog

/**
 * 定义了一个日志bean类，对应一个录井采集数据表。
 */
class LoggingBean extends Serializable {
  var id:Long = _ //自增id
  var logType:String = _ //日志类型
  var wellId:Long =_ //井id
  var wellName:String =_ //井名字
  var happenTime:Long = _ //录取时间
  var logTime:Long = _ //收集时间
  var logDepth:Double =_ //井深数据
  var drillRate:Double =_ //钻时数据
  var wellDeflection:Double =_ //井斜数据
  var description:String = _

  //定义构造器方法
  def this(id:Long,logType:String, wellId:Long, wellName: String, happenTime:Long,logTime:Long, logDepth:Double, drillRate: Double, wellDefleaction:Double) {
    this
    this.id = id
    this.logType = logType
    this.wellId = wellId
    this.wellName = wellName
    this.happenTime = happenTime
    this.logTime = logTime
    this.logDepth = logDepth
    this.drillRate = drillRate
    this.wellDeflection = wellDefleaction
  }

  //重新bean类型的toString，方便日志的输出
  override def toString: String = {
    s"${id},${logType},${wellId},${happenTime},${logTime},${wellName},${logDepth},${drillRate},${wellDeflection},${description}"
  }

}
